import Vue from 'vue'
import Router from 'vue-router'

// 消费用户
import ConsumerBaseLayout from '@/pages/consumer/BaseLayout'
import ConsumerWallet from '@/pages/consumer/Wallet'  // 钱包
import ConsumerOrderDetail from '@/pages/consumer/OrderDetail'  // 订单详情
import ConsumerRecharge from '@/pages/consumer/Recharge'  // 充值
import ConsumerWithdrawCashToBankcard from '@/pages/consumer/WithdrawCashToBankcard'  // 提现到银行卡
import ConsumerWithdrawCashToAlipay from '@/pages/consumer/WithdrawCashToAlipay'  // 提现到支付宝
import ConsumerWithdrawCashToBalance from '@/pages/consumer/WithdrawCashToBalance'  // 提现到余额
import ConsumerBankcardList from '@/pages/consumer/BankcardList'  // 银行卡列表
import ConsumerEditorBankcard from '@/pages/consumer/EditorBankcard'  // 银行卡编辑
import ConsumerCouponManagement from '@/pages/consumer/CouponManagement'  // 优惠券管理
import ConsumerAddressManagement from '@/pages/consumer/AddressManagement'  // 地址管理
import ConsumerEditorAddress from '@/pages/consumer/EditorAddress'  // 地址管理
import ConsumerMemberCenter from '@/pages/consumer/MemberCenter'  // 会员中心
import ConsumerMemberPurchase from '@/pages/consumer/MemberPurchase'  // 会员购买
import ConsumerMemberDescription from '@/pages/consumer/MemberDescription'  // 会员说明
import ConsumerSignIn from '@/pages/consumer/SignIn'  // 会员说明
import ConsumerMessageManagement from '@/pages/consumer/MessageManagement'  // 消息管理
import ConsumerAdvise from '@/pages/consumer/Advise'  // 意见反馈
import ConsumerLabelSetting from '@/pages/consumer/LabelSetting'  // 标签设置
import ConsumerBuy from '@/pages/consumer/Buy'  // 帮我买
import ConsumerLargess from '@/pages/consumer/Largess'  // 帮我送
import ConsumerLineUp from '@/pages/consumer/LineUp'  // 帮排队
import ConsumerPriceBreakdown from '@/pages/consumer/PriceBreakdown'  // 价格详情

// 服务人员
import ServiceBaseLayout from '@/pages/service/BaseLayout'
import ServiceOrderDetail from '@/pages/service/OrderDetail'  // 订单详情
import ServiceLocationsDetail from '@/pages/service/LocationsDetail'  // 位置详情
import ServiceBankcardList from '@/pages/service/BankcardList'  // 银行卡列表
import ServiceEditorBankcard from '@/pages/service/EditorBankcard'  // 银行卡编辑
import ServiceWallet from '@/pages/service/Wallet'  // 钱包
import ServiceWithdrawCashToBankcard from '@/pages/service/WithdrawCashToBankcard'  // 提现到银行卡
import ServiceWithdrawCashToAlipay from '@/pages/service/WithdrawCashToAlipay'  // 提现到支付宝
import ServiceWithdrawCashToBalance from '@/pages/service/WithdrawCashToBalance'  // 提现到余额
import ServiceBalanceRecord from '@/pages/service/BalanceRecord'  // 提现记录
import ServiceStatisticMap from '@/pages/service/StatisticMap'  // 提现记录
import ServiceMessageManagement from '@/pages/service/MessageManagement'  // 消息管理
import ServiceBail from '@/pages/service/Bail'  // 保证金

// 模块管理
import ModuleHome from '@/pages/module/Home'
import ModuleApply from '@/pages/module/Apply'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: ConsumerBaseLayout,
      redirect: '/ConsumerBaseLayout',
    },
    {
      path: '/ConsumerBaseLayout',
      name: 'ConsumerBaseLayout',
      component: ConsumerBaseLayout,
      children: [
        {
          path: '/ConsumerWallet',
          name: 'ConsumerWallet',
          component: ConsumerWallet,
          children: [
            {
              path: '/ConsumerRecharge',
              name: 'ConsumerRecharge',
              component: ConsumerRecharge
            },
            {
              path: '/ConsumerWithdrawCashToBankcard',
              name: 'ConsumerWithdrawCashToBankcard',
              component: ConsumerWithdrawCashToBankcard,
              children: [
                {
                  path: '/ConsumerSelectBankcard/:select',
                  name: 'ConsumerSelectBankcard',
                  component: ConsumerBankcardList,
                  children: [
                    {
                      path: '/ConsumerSelectEditorBankcard',
                      name: 'ConsumerSelectEditorBankcard',
                      component: ConsumerEditorBankcard
                    },
                  ]
                },
              ]
            },
            {
              path: '/ConsumerWithdrawCashToAlipay',
              name: 'ConsumerWithdrawCashToAlipay',
              component: ConsumerWithdrawCashToAlipay
            },
            {
              path: '/ConsumerWithdrawCashToBalance',
              name: 'ConsumerWithdrawCashToBalance',
              component: ConsumerWithdrawCashToBalance
            },
            {
              path: '/ConsumerBankcardList',
              name: 'ConsumerBankcardList',
              component: ConsumerBankcardList,
              children: [
                {
                  path: '/ConsumerEditorBankcard',
                  name: 'ConsumerEditorBankcard',
                  component: ConsumerEditorBankcard
                },
              ]
            },
          ]
        },
        {
          path: '/ConsumerOrderDetail',
          name: 'ConsumerOrderDetail',
          component: ConsumerOrderDetail
        },
        {
          path: '/ConsumerCouponManagement',
          name: 'ConsumerCouponManagement',
          component: ConsumerCouponManagement
        },
        {
          path: '/ConsumerAddressManagement',
          name: 'ConsumerAddressManagement',
          component: ConsumerAddressManagement,
          children: [
            {
              path: '/ConsumerEditorAddress',
              name: 'ConsumerEditorAddress',
              component: ConsumerEditorAddress
            },
          ]
        },
        {
          path: '/ConsumerMemberCenter',
          name: 'ConsumerMemberCenter',
          component: ConsumerMemberCenter,
          children: [
            {
              path: '/ConsumerMemberPurchase',
              name: 'ConsumerMemberPurchase',
              component: ConsumerMemberPurchase
            },
            {
              path: '/ConsumerMemberDescription',
              name: 'ConsumerMemberDescription',
              component: ConsumerMemberDescription
            },
            {
              path: '/ConsumerSignIn',
              name: 'ConsumerSignIn',
              component: ConsumerSignIn
            },
          ]
        },
        {
          path: '/ConsumerMessageManagement',
          name: 'ConsumerMessageManagement',
          component: ConsumerMessageManagement
        },
        {
          path: '/ConsumerAdvise',
          name: 'ConsumerAdvise',
          component: ConsumerAdvise
        },
        {
          path: '/ConsumerLabelSetting',
          name: 'ConsumerLabelSetting',
          component: ConsumerLabelSetting
        },
        {
          path: '/ConsumerBuy',
          name: 'ConsumerBuy',
          component: ConsumerBuy,
          children: [
            {
              path: '/ConsumerBuyPriceBreakdown',
              name: 'ConsumerBuyPriceBreakdown',
              component: ConsumerPriceBreakdown,
            }
          ]
        },
        {
          path: '/ConsumerLargess',
          name: 'ConsumerLargess',
          component: ConsumerLargess,
          children: [
            {
              path: '/ConsumerLargessPriceBreakdown',
              name: 'ConsumerLargessPriceBreakdown',
              component: ConsumerPriceBreakdown,
            }
          ]
        },
        {
          path: '/ConsumerLineUp',
          name: 'ConsumerLineUp',
          component: ConsumerLineUp,
          children: [
            {
              path: '/ConsumerLineUpPriceBreakdown',
              name: 'ConsumerLineUpPriceBreakdown',
              component: ConsumerPriceBreakdown,
            }
          ]
        },
      ]
    },
    {
      path: '/ServiceBaseLayout',
      name: 'ServiceBaseLayout',
      component: ServiceBaseLayout,
      children: [
        {
          path: '/ServiceOrderDetail',
          name: 'ServiceOrderDetail',
          component: ServiceOrderDetail,
          children: [
            {
              path: '/ServiceLocationsDetail',
              name: 'ServiceLocationsDetail',
              component: ServiceLocationsDetail,
            }
          ]
        },
        {
          path: '/ServiceBankcardList',
          name: 'ServiceBankcardList',
          component: ServiceBankcardList,
          children: [
            {
              path: '/ServiceEditorBankcard',
              name: 'ServiceEditorBankcard',
              component: ServiceEditorBankcard,
            }
          ]
        },
        {
          path: '/ServiceWallet',
          name: 'ServiceWallet',
          component: ServiceWallet,
          children: [
            {
              path: '/ServiceWithdrawCashToBankcard',
              name: 'ServiceWithdrawCashToBankcard',
              component: ServiceWithdrawCashToBankcard,
              children: [
                {
                  path: '/ServiceSelectBankcard/:select',
                  name: 'ServiceSelectBankcard',
                  component: ServiceBankcardList,
                  children: [
                    {
                      path: '/ServiceSelectEditorBankcard',
                      name: 'ServiceSelectEditorBankcard',
                      component: ServiceEditorBankcard
                    },
                  ]
                },
              ]
            },
            {
              path: '/ServiceWithdrawCashToAlipay',
              name: 'ServiceWithdrawCashToAlipay',
              component: ServiceWithdrawCashToAlipay
            },
            {
              path: '/ServiceWithdrawCashToBalance',
              name: 'ServiceWithdrawCashToBalance',
              component: ServiceWithdrawCashToBalance
            },
            {
              path: '/ServiceBalanceRecord',
              name: 'ServiceBalanceRecord',
              component: ServiceBalanceRecord
            },
          ]
        },
        {
          path: '/ServiceStatisticMap',
          name: 'ServiceStatisticMap',
          component: ServiceStatisticMap
        },
        {
          path: '/ServiceMessageManagement',
          name: 'ServiceMessageManagement',
          component: ServiceMessageManagement
        },
        {
          path: '/ServiceBail',
          name: 'ServiceBail',
          component: ServiceBail
        },
      ]
    },
    {
      path: '/ModuleHome',
      name: 'ModuleHome',
      component: ModuleHome,
      children: [
        {
          path: '/ModuleApply',
          name: 'ModuleApply',
          component: ModuleApply
        },
      ]
    }
  ]
})
